/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package presentation;

import runtime.RuntimeInstance;
import runtime.RuntimeInstanceFactory;

/**
 *
 * @author Alejandro
 */
public class PresentationElementFactory implements RuntimeInstanceFactory {
    public static final String TEXT = "TextElement";
    public static final String DATE = "DateElement";
    public static final String LINK = "LinkElement";
    public static final String CURRENCY = "CurrencyElement";

    @Override
    public RuntimeInstance getObject(String typeName) {
        if (typeName.equals(TEXT)) {
            return new TextElement();
        }
        if (typeName.equals(DATE)) {
            return new DateElement();
        }
        if (typeName.equals(LINK)) {
            return new LinkElement();
        }
        if (typeName.equals(CURRENCY)) {
            return new CurrencyElement();
        }
        return null;
    }

}
